package com.ruoyi.web.controller.business;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.vo.business.FyProjectApplyAndPlanSelectListVO;
import com.ruoyi.system.domain.vo.business.FyProjectPlanSelectListVO;
import com.ruoyi.system.service.IFyProjectPlanService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 扶垚项目进度上报Controller
 */
@Controller
@Api(tags = {"扶垚项目进度上报"})
@RequestMapping("/system/fyProjectPlan")
public class FyProjectPlanController extends BaseController {

    @Autowired
    private IFyProjectPlanService fyProjectPlanService;

    /**
     * 查询扶垚计划项目申报列表
     */
    @ApiOperation("查询扶垚计划项目申报列表")
    //@RequiresPermissions("system:application:list")
    @PostMapping("/list")
    @ResponseBody
    public AjaxResult<FyProjectApplyAndPlanSelectListVO> list(Long fyProjectApplyId, Long userId) {
        List<FyProjectApplyAndPlanSelectListVO> list = fyProjectPlanService.getListByUserIdAndProjectId(fyProjectApplyId,userId);
        return success(list);
    }

}
